package com.wyl.aop.cglib.service.impl;

import com.wyl.aop.cglib.service.CglibAopService;
import org.springframework.stereotype.Service;

@Service
public class CglibAopServiceImpl /*implements CglibAopService*/ {

//    @Override
    public String getStr1(String str) {
        this.getStr2("this调用public的方法"); // 会触发aop
        this.getStr3("this调用private的方法"); // 不会触发aop
        System.out.println(str);
        return str;
    }

    public String getStr2(String str) {
        System.out.println(str);
        return str;
    }

    private String getStr3(String str) {
        System.out.println(str);
        return str;
    }
}